package furn.test;


import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


@SuppressWarnings("all")
public class T1 {

    @Test
    public void t1() {
        //测试spring配置的Bean能否获取
        //1、获取容器
        ApplicationContext ioc = new ClassPathXmlApplicationContext("applicationContext.xml");
        //2、获取bean对象
        Object bean = ioc.getBean("pooledDataSource");
        System.out.println("数据源对象：" + bean);
        System.out.println("数据库连接池：" + ioc.getBean("sqlSessionFactory"));
    }
}
